using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Drawing;

namespace WindowsApplication2.TreeView.Graphic
{
    public partial class dbPanel : Control
    {
        private ArrayList guiTreeNodes;
        public dbPanel()
        {
            this.DoubleBuffered = true;
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.UpdateZOrder();
            UpdateStyles();
            // 


            InitializeComponent();


        }

        public dbPanel(IContainer container)
        {
            container.Add(this);
            this.DoubleBuffered = true;
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.UpdateZOrder();
            UpdateStyles();
            InitializeComponent();
        }

        private void dbPanel_Paint(object sender, PaintEventArgs e)
        {
            //    if (guiTreeNodes != null)
            //    {
            //        Graphics g = this.CreateGraphics();
            //        g.FillEllipse(Brushes.Black, 0, 0, this.Width, this.Height);
            //        //if we don't have nodes ready to print
            //        //go over the tree and print all the nodes
            //        //ArrayList arrayTree = root.LogicNode.ToPostOrder();
            //        foreach (RadNodeGUI node in guiTreeNodes)
            //        {
            //            node.paintNode(Pnl_TreeShow);
            //        }
            //        foreach (RadNodeGUI node in guiTreeNodes)
            //        {
            //            node.paintBody(Pnl_TreeShow);
            //        }
            //        this.Update();
            //    }
            //}
        }
    }
}